%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for queries/v4/network_types"
    Bucket0("Bucket 0 (root)<br /><br />1: <br />ᐳ: 6, 11, 12, 108, 109, 110, 7, 13, 15, 17, 23, 25, 31<br />2: 10, 20, 28, 36, 41, 46<br />ᐳ: Access[67], Access[70], Access[73]<br />3: 14, 22, 30, 38, 43, 48<br />ᐳ: 37, 39, 40, 42, 44, 45, 47, 49, 50<br />4: 51, 54, 57<br />ᐳ: 66, 68, 69, 71, 72, 74, 75, 76, 77, 78, 79, 80"):::bucket
    Bucket1("Bucket 1 (nullableBoundary)<br />Deps: 14, 67, 51, 40, 68, 76<br /><br />ROOT Connectionᐸ10ᐳ[14]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 22, 70, 54, 45, 71, 78<br /><br />ROOT Connectionᐸ20ᐳ[22]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 30, 73, 57, 50, 74, 80<br /><br />ROOT Connectionᐸ28ᐳ[30]"):::bucket
    Bucket7("Bucket 7 (listItem)<br />Deps: 67<br /><br />ROOT __Item{7}ᐸ51ᐳ[60]"):::bucket
    Bucket8("Bucket 8 (listItem)<br />Deps: 70<br /><br />ROOT __Item{8}ᐸ54ᐳ[62]"):::bucket
    Bucket9("Bucket 9 (listItem)<br />Deps: 73<br /><br />ROOT __Item{9}ᐸ57ᐳ[64]"):::bucket
    Bucket10("Bucket 10 (nullableBoundary)<br />Deps: 60, 61, 88<br /><br />ROOT Edge{7}[61]"):::bucket
    Bucket11("Bucket 11 (nullableBoundary)<br />Deps: 62, 63, 90<br /><br />ROOT Edge{8}[63]"):::bucket
    Bucket12("Bucket 12 (nullableBoundary)<br />Deps: 64, 65, 92<br /><br />ROOT Edge{9}[65]"):::bucket
    Bucket13("Bucket 13 (nullableBoundary)<br />Deps: 93<br /><br />ROOT PgSelectSingle{10}ᐸnetworkᐳ[93]"):::bucket
    Bucket14("Bucket 14 (nullableBoundary)<br />Deps: 94<br /><br />ROOT PgSelectSingle{11}ᐸnetworkᐳ[94]"):::bucket
    Bucket15("Bucket 15 (nullableBoundary)<br />Deps: 95<br /><br />ROOT PgSelectSingle{12}ᐸnetworkᐳ[95]"):::bucket
    end
    Bucket0 --> Bucket1 & Bucket2 & Bucket3
    Bucket1 --> Bucket7
    Bucket2 --> Bucket8
    Bucket3 --> Bucket9
    Bucket7 --> Bucket10
    Bucket8 --> Bucket11
    Bucket9 --> Bucket12
    Bucket10 --> Bucket13
    Bucket11 --> Bucket14
    Bucket12 --> Bucket15

    %% plan dependencies
    __InputObject7{{"__InputObject[7∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[6]<br />- Constantᐸ'192.168.0.0'ᐳ[108]"}}:::plan
    PgSelect10[["PgSelect[10∈0] ➊<br />ᐸnetwork+1ᐳ"]]:::plan
    Object13{{"Object[13∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    ApplyInput15{{"ApplyInput[15∈0] ➊"}}:::plan
    Object13 & ApplyInput15 --> PgSelect10
    Access11{{"Access[11∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access12{{"Access[12∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access11 & Access12 --> Object13
    __InputObject17{{"__InputObject[17∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[6]<br />- Constantᐸ'192.168.0.0/16'ᐳ[109]"}}:::plan
    PgSelect20[["PgSelect[20∈0] ➊<br />ᐸnetwork+1ᐳ"]]:::plan
    ApplyInput23{{"ApplyInput[23∈0] ➊"}}:::plan
    Object13 & ApplyInput23 --> PgSelect20
    __InputObject25{{"__InputObject[25∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[6]<br />- Constantᐸ'08:00:2b:01:02:03'ᐳ[110]"}}:::plan
    PgSelect28[["PgSelect[28∈0] ➊<br />ᐸnetwork+1ᐳ"]]:::plan
    ApplyInput31{{"ApplyInput[31∈0] ➊"}}:::plan
    Object13 & ApplyInput31 --> PgSelect28
    PgSelect36[["PgSelect[36∈0] ➊<br />ᐸnetwork(aggregate)ᐳ"]]:::plan
    Object13 & ApplyInput15 --> PgSelect36
    PgSelect41[["PgSelect[41∈0] ➊<br />ᐸnetwork(aggregate)ᐳ"]]:::plan
    Object13 & ApplyInput23 --> PgSelect41
    PgSelect46[["PgSelect[46∈0] ➊<br />ᐸnetwork(aggregate)ᐳ"]]:::plan
    Object13 & ApplyInput31 --> PgSelect46
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access11
    __Value2 --> Access12
    Connection14[["Connection[14∈0] ➊<br />ᐸ10ᐳ<br />Dependents: 4"]]:::plan
    PgSelect10 --> Connection14
    __InputObject7 --> ApplyInput15
    Connection22[["Connection[22∈0] ➊<br />ᐸ20ᐳ<br />Dependents: 4"]]:::plan
    PgSelect20 --> Connection22
    __InputObject17 --> ApplyInput23
    Connection30[["Connection[30∈0] ➊<br />ᐸ28ᐳ<br />Dependents: 4"]]:::plan
    PgSelect28 --> Connection30
    __InputObject25 --> ApplyInput31
    First37{{"First[37∈0] ➊"}}:::plan
    PgSelectRows38[["PgSelectRows[38∈0] ➊"]]:::plan
    PgSelectRows38 --> First37
    PgSelect36 --> PgSelectRows38
    PgSelectSingle39{{"PgSelectSingle[39∈0] ➊<br />ᐸnetworkᐳ"}}:::plan
    First37 --> PgSelectSingle39
    First42{{"First[42∈0] ➊"}}:::plan
    PgSelectRows43[["PgSelectRows[43∈0] ➊"]]:::plan
    PgSelectRows43 --> First42
    PgSelect41 --> PgSelectRows43
    PgSelectSingle44{{"PgSelectSingle[44∈0] ➊<br />ᐸnetworkᐳ"}}:::plan
    First42 --> PgSelectSingle44
    First47{{"First[47∈0] ➊"}}:::plan
    PgSelectRows48[["PgSelectRows[48∈0] ➊"]]:::plan
    PgSelectRows48 --> First47
    PgSelect46 --> PgSelectRows48
    PgSelectSingle49{{"PgSelectSingle[49∈0] ➊<br />ᐸnetworkᐳ"}}:::plan
    First47 --> PgSelectSingle49
    ConnectionItems51[["ConnectionItems[51∈0] ➊<br />Dependents: 3<br />More deps:<br />- Connection[14]"]]:::plan
    ConnectionItems54[["ConnectionItems[54∈0] ➊<br />Dependents: 3<br />More deps:<br />- Connection[22]"]]:::plan
    ConnectionItems57[["ConnectionItems[57∈0] ➊<br />Dependents: 3<br />More deps:<br />- Connection[30]"]]:::plan
    First66{{"First[66∈0] ➊<br />More deps:<br />- ConnectionItems[51]"}}:::plan
    Access67{{"Access[67∈0] ➊<br />ᐸ10.cursorDetailsᐳ<br />Dependents: 3"}}:::plan
    PgSelect10 --> Access67
    First69{{"First[69∈0] ➊<br />More deps:<br />- ConnectionItems[54]"}}:::plan
    Access70{{"Access[70∈0] ➊<br />ᐸ20.cursorDetailsᐳ<br />Dependents: 3"}}:::plan
    PgSelect20 --> Access70
    First72{{"First[72∈0] ➊<br />More deps:<br />- ConnectionItems[57]"}}:::plan
    Access73{{"Access[73∈0] ➊<br />ᐸ28.cursorDetailsᐳ<br />Dependents: 3"}}:::plan
    PgSelect28 --> Access73
    Last75{{"Last[75∈0] ➊<br />More deps:<br />- ConnectionItems[51]"}}:::plan
    Last77{{"Last[77∈0] ➊<br />More deps:<br />- ConnectionItems[54]"}}:::plan
    Last79{{"Last[79∈0] ➊<br />More deps:<br />- ConnectionItems[57]"}}:::plan
    PageInfo33{{"PageInfo[33∈1] ➊<br />More deps:<br />- Connection[14]"}}:::plan
    Access81{{"Access[81∈1] ➊<br />ᐸ14.hasNextPageᐳ<br />More deps:<br />- Connection[14]"}}:::plan
    Access84{{"Access[84∈1] ➊<br />ᐸ14.hasPreviousPageᐳ<br />More deps:<br />- Connection[14]"}}:::plan
    PageInfo34{{"PageInfo[34∈2] ➊<br />More deps:<br />- Connection[22]"}}:::plan
    Access82{{"Access[82∈2] ➊<br />ᐸ22.hasNextPageᐳ<br />More deps:<br />- Connection[22]"}}:::plan
    Access85{{"Access[85∈2] ➊<br />ᐸ22.hasPreviousPageᐳ<br />More deps:<br />- Connection[22]"}}:::plan
    PageInfo35{{"PageInfo[35∈3] ➊<br />More deps:<br />- Connection[30]"}}:::plan
    Access83{{"Access[83∈3] ➊<br />ᐸ30.hasNextPageᐳ<br />More deps:<br />- Connection[30]"}}:::plan
    Access86{{"Access[86∈3] ➊<br />ᐸ30.hasPreviousPageᐳ<br />More deps:<br />- Connection[30]"}}:::plan
    Edge61{{"Edge[61∈7]"}}:::plan
    __Item60[/"__Item[60∈7]<br />ᐸ51ᐳ<br />More deps:<br />- ConnectionItems[51]"\]:::itemplan
    PgCursor88{{"PgCursor[88∈7]<br />More deps:<br />- Access[67]"}}:::plan
    __Item60 & PgCursor88 --> Edge61
    __Item60 --> PgCursor88
    Edge63{{"Edge[63∈8]"}}:::plan
    __Item62[/"__Item[62∈8]<br />ᐸ54ᐳ<br />More deps:<br />- ConnectionItems[54]"\]:::itemplan
    PgCursor90{{"PgCursor[90∈8]<br />More deps:<br />- Access[70]"}}:::plan
    __Item62 & PgCursor90 --> Edge63
    __Item62 --> PgCursor90
    Edge65{{"Edge[65∈9]"}}:::plan
    __Item64[/"__Item[64∈9]<br />ᐸ57ᐳ<br />More deps:<br />- ConnectionItems[57]"\]:::itemplan
    PgCursor92{{"PgCursor[92∈9]<br />More deps:<br />- Access[73]"}}:::plan
    __Item64 & PgCursor92 --> Edge65
    __Item64 --> PgCursor92
    PgSelectSingle93{{"PgSelectSingle[93∈10]<br />ᐸnetworkᐳ"}}:::plan
    __Item60 --> PgSelectSingle93
    PgSelectSingle94{{"PgSelectSingle[94∈11]<br />ᐸnetworkᐳ"}}:::plan
    __Item62 --> PgSelectSingle94
    PgSelectSingle95{{"PgSelectSingle[95∈12]<br />ᐸnetworkᐳ"}}:::plan
    __Item64 --> PgSelectSingle95
    PgClassExpression96{{"PgClassExpression[96∈13]<br />ᐸ__network__.”id”ᐳ"}}:::plan
    PgSelectSingle93 --> PgClassExpression96
    PgClassExpression99{{"PgClassExpression[99∈13]<br />ᐸ__network__.”inet”ᐳ"}}:::plan
    PgClassExpression96 o--o PgClassExpression99
    PgClassExpression102{{"PgClassExpression[102∈13]<br />ᐸ__network__.”cidr”ᐳ"}}:::plan
    PgClassExpression99 o--o PgClassExpression102
    PgClassExpression105{{"PgClassExpression[105∈13]<br />ᐸ__network__.”macaddr”ᐳ"}}:::plan
    PgClassExpression102 o--o PgClassExpression105
    PgClassExpression97{{"PgClassExpression[97∈14]<br />ᐸ__network__.”id”ᐳ"}}:::plan
    PgSelectSingle94 --> PgClassExpression97
    PgClassExpression100{{"PgClassExpression[100∈14]<br />ᐸ__network__.”inet”ᐳ"}}:::plan
    PgClassExpression97 o--o PgClassExpression100
    PgClassExpression103{{"PgClassExpression[103∈14]<br />ᐸ__network__.”cidr”ᐳ"}}:::plan
    PgClassExpression100 o--o PgClassExpression103
    PgClassExpression106{{"PgClassExpression[106∈14]<br />ᐸ__network__.”macaddr”ᐳ"}}:::plan
    PgClassExpression103 o--o PgClassExpression106
    PgClassExpression98{{"PgClassExpression[98∈15]<br />ᐸ__network__.”id”ᐳ"}}:::plan
    PgSelectSingle95 --> PgClassExpression98
    PgClassExpression101{{"PgClassExpression[101∈15]<br />ᐸ__network__.”inet”ᐳ"}}:::plan
    PgClassExpression98 o--o PgClassExpression101
    PgClassExpression104{{"PgClassExpression[104∈15]<br />ᐸ__network__.”cidr”ᐳ"}}:::plan
    PgClassExpression101 o--o PgClassExpression104
    PgClassExpression107{{"PgClassExpression[107∈15]<br />ᐸ__network__.”macaddr”ᐳ"}}:::plan
    PgClassExpression104 o--o PgClassExpression107

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject7,PgSelect10,Access11,Access12,Object13,Connection14,ApplyInput15,__InputObject17,PgSelect20,Connection22,ApplyInput23,__InputObject25,PgSelect28,Connection30,ApplyInput31,PgSelect36,First37,PgSelectRows38,PgSelectSingle39,PgSelect41,First42,PgSelectRows43,PgSelectSingle44,PgSelect46,First47,PgSelectRows48,PgSelectSingle49,ConnectionItems51,ConnectionItems54,ConnectionItems57,First66,Access67,First69,Access70,First72,Access73,Last75,Last77,Last79 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PageInfo33,Access81,Access84 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2,PageInfo34,Access82,Access85 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PageInfo35,Access83,Access86 bucket3
    classDef bucket7 stroke:#808000
    class Bucket7,__Item60,Edge61,PgCursor88 bucket7
    classDef bucket8 stroke:#dda0dd
    class Bucket8,__Item62,Edge63,PgCursor90 bucket8
    classDef bucket9 stroke:#ff0000
    class Bucket9,__Item64,Edge65,PgCursor92 bucket9
    classDef bucket10 stroke:#ffff00
    class Bucket10,PgSelectSingle93 bucket10
    classDef bucket11 stroke:#00ffff
    class Bucket11,PgSelectSingle94 bucket11
    classDef bucket12 stroke:#4169e1
    class Bucket12,PgSelectSingle95 bucket12
    classDef bucket13 stroke:#3cb371
    class Bucket13,PgClassExpression96,PgClassExpression99,PgClassExpression102,PgClassExpression105 bucket13
    classDef bucket14 stroke:#a52a2a
    class Bucket14,PgClassExpression97,PgClassExpression100,PgClassExpression103,PgClassExpression106 bucket14
    classDef bucket15 stroke:#ff00ff
    class Bucket15,PgClassExpression98,PgClassExpression101,PgClassExpression104,PgClassExpression107 bucket15

